home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)abm2.d64
/
copier
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
5KB
|
148 lines
10 GOTO30
20 HI=INT(NU/256):LO=NU-HI*256:RETURN
30 IFY=0THENY=1:LOAD"FILECOPY.O",8,1
40 POKE51,.:POKE56,47:CLR:DIM F$(100),T$(100),EA(100),SA(100)
45 DD%=9:CLOSE2:OPEN2,9,15:CLOSE2:IFSTTHENDD%=8
46 IFDD%=9THENGOSUB2000
50 RB=1:GOSUB520:SA=12288
60 FL$="":F=32768
70 A=PEEK(F):IFA<>0THENFL$=FL$+CHR$(A):F=F+1:GOTO70
80 IFLEN(FL$)>16THENFL$=LEFT$(FL$,16)
90 OPEN2,8,2,"FILES ON SIDE "+SI$
100 INPUT#2,A$:I=ST:INPUT#2,NF$:NF=VAL(NF$):INPUT#2,NB$:NB=VAL(NB$)+1
110 FORX=1TONF:INPUT#2,F$(X),T$(X):NEXT
120 NF=NF+1:F$(NF)="LOADSTAR READER":T$(NF)="P"
130 IFA$<>FL$ANDI=0THEN100
140 IFA$=FL$THEN170
150 PRINT"ERROR....FILE "FL$" NOT FOUND IN FILE!":CLOSE2
160 STOP
170 CLOSE2
180 PRINT
190 PRINT:POKE198,.
200 :
210 :
220 D1=.
230 NU=SA:GOSUB20:D1=D1+1:D=D1:POKE12131,HI:POKE12135,LO:SA(D1)=SA
240 GOSUB670:PRINT"[154]READING:"F$(D)
250 OPEN1,8,2,F$(D):SYS12040:CLOSE1
260 EA(D1)=PEEK(832)+PEEK(833)*256:SA=EA(D1)+1
270 IF (EA(D1)<53248) AND (D1<NF) THEN 230
280 IF EA(D1)<53248 THEN 310
290 D1=D1-1:SA=12288:PRINT"[150] "
300 PRINT" "
310 IFDD%=9THEN340
315 PRINT" INSERT DESTINATION DISK... "
320 PRINT" PRESS SPACE WHEN READY TO COPY.":POKE198,.
330 GETA$:IFA$<>" "THEN330
340 IFRBTHENPRINT" [129]CHECKING # OF BLOCKS FREE"
350 IFRBTHENRB=.:GOSUB790
360 D2=D2+1:D=D2:GOSUB670
370 PRINT"[154]WRITING:"F$(D):GOSUB640
380 IF(MM)THEN420
390 NU=EA(D2):GOSUB20:POKE832,LO:POKE833,HI
400 NU=SA(D2):GOSUB20:POKE12131,HI:POKE12135,LO
410 OPEN1,DD%,2,F$(D)+","+T$(D)+",W":SYS12084:CLOSE1
420 IF D2<D1 THEN 360
430 IFDD%=9THEN460
435 PRINT" INSERT [153]"DN$"..."
440 PRINT" PRESS SPACE WHEN READY TO CONTINUE.":POKE198,.
450 GETA$:IFA$<>" "THEN450
460 GOSUB600:IF(MM$<>DN$)THENGOSUB710:GOTO460
470 PRINT"[145][145]";:FORA=1TO2:PRINT" ":NEXT
480 PRINT"[145][145][145]";:POKE832,.:POKE833,32
490 IF D1<NF THEN 230
500 GOSUB1030:REM LOADING INSTRUCTIONS
510 GOTO1310
520 POKE53280,0:POKE53281,0
530 PRINTCHR$(142)"[147][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]";
540 PRINT"[221] LOADSTAR PROGRAM COPIER [221]";
550 PRINT"[221] [154]BY: MIKE MAYNARD & ALAN GARDNER [221]";
560 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]";
570 FORA=217TO242:POKEA,PEEK(A)OR128:NEXT
580 GOSUB600:SI$=RIGHT$(DN$,1):MM$=DN$
590 PRINT" PLEASE WAIT FIVE MORE SECONDS... ":RETURN
600 OPEN15,8,15,"I0":OPEN8,8,8,"#"
610 PRINT#15,"UA:8 0 18 0"
620 PRINT#15,"B-P:8 144"
630 DN$="":FORA=1TO16:GET#8,A$:DN$=DN$+A$:NEXT:CLOSE8:CLOSE15:RETURN
640 OPEN15,DD%,15,"R0:"+F$(D)+"="+F$(D):INPUT#15,ER:CLOSE15
650 MM=.:IFER=63THENMM=1
660 RETURN
670 PRINT"";:FORA=1TO20:PRINT" ":NEXT
680 RETURN
690 PRINT"[145][145][145][145][145][145]";:FORA=1TO6:PRINT" "
700 NEXT:PRINT"[145][145][145][145][145]";:RETURN
710 PRINT"[145][145][159] "MM$"[154] IS NOT IN THE DRIVE."
720 PRINT" "
730 PRINT" PUT [159]"MM$" [154]IN THE DRIVE AND"
740 PRINT" PRESS SPACE [154]TO TRY AGAIN.":POKE198,.
750 GETA$:IFA$<>" "THEN750
760 PRINT"[145][145][145][145]";:FORA=1TO4:PRINT" ":NEXT
770 PRINT"[145][145][145]":RETURN
780 REM CHECK # OF BLOCKS FREE
790 OPEN15,DD%,15,"I0":INPUT#15,ER:CLOSE15:IF(ER<20)OR(ER>24)THEN810
800 GOSUB670:PRINT" THE DISK IN THE DRIVE ISN'T FORMATTED.":GOTO910
810 OPEN15,DD%,15,"I0":OPEN8,DD%,8,"#"
820 PRINT#15,"UA:8 0 18 0":PRINT#15,"B-P:8 4"
830 BA=.:FORA=1TO35:IFA=18THENGET#8,A$:GOTO850
840 GET#8,A$:BA=BA+ASC(A$+CHR$(.))
850 FORB=1TO3:GET#8,A$:NEXT
860 NEXT:IFNB<BATHENCLOSE8:CLOSE15:RETURN
870 CLOSE8:CLOSE15
880 GOSUB670:PRINT"THERE'S NOT ENOUGH ROOM ON THIS DISK"
890 PRINT"FOR [150]"F$(D)" AND THE FILES"
900 PRINT"ASSOCIATED WITH IT."
910 PRINT"[158] YOUR OPTIONS:"
920 PRINT"F[154]ORMAT A DISK FOR THIS PROGRAM"
930 PRINT"T[154]RY SAVING THIS PROGRAM ON ANOTHER DISK"
940 PRINT"Q[154]UIT (FORGET ABOUT COPYING IT)
950 [153]"PRESS FCONT, TCONT, OR QCONT.":[151]198,.
960 A[178][194](203):[139]A[179][177]21[175]A[179][177]22[175]A[179][177]62[167]960
970 [139]A[178]62[167][141]1250:[137]960
980 [139]A[178]22[167][153]" FORCHECKING # OF BLOCKS FREE":[137]790
990 [153]"CONT PUT DISK TO FORMAT IN DRIVE 0"
1000 [153]" PRESS SPACECONT WHEN READY TO FORMAT":[151]198,.
1010 [161]A$:[139]A$[179][177]" "[167]1010
1020 [159]15,DD%,15,"N0:LOADSTAR PROGS,MM":[160]15:[137]790
1030 [141]670:[153]" CONT-- FINISHED COPYING CONT--"
1040 [153]"CONTTO LOAD THIS PROGRAM FROM BASIC, ENTER:"
1050 [153]"LOAD "[199](34)F$(1)[199](34)",8"
1060 [153]"ON"[163]30)"CONTTHEN...":[153]"RUN"
1070 [153]"CONT PLEASE MAKE NOTE OF THIS..."
1080 [153]" PRESS SPACE CONTFOR MORE"
1090 [139][194](203)[179][177]60[167]1090
1100 [141]670:[153]""
1110 [153]"CONTTO READ ABOUT THIS PROGRAM FROM BASIC,"
1120 [153]"ENTER THE FOLLOWING:"
1130 [153]"LOAD "[199](34)"LOADSTAR READER"[199](34)",8,1 CONTTHEN..."
1140 [153]"NEW CONTTHEN..."
1150 [153]"SYS 679,"[199](34)"T."F$(1)[199](34)
1160 [153]"CONTUSE PCONT TO PAUSE, CCONT TO CONTINUE, AND"
1170 [153]"ACONT TO ABORT."
1180 [153]"CONT PLEASE MAKE NOTE OF THIS..."
1190 [153]" PRESS SPACE CONTTO RETURN TO LOADSTAR"
1200 [139][194](203)[179][177]60[167]1200
1210 [142]
1220 [159]3,8,3,"FILES ON SIDE 1"
1230 [129]I[178].[164]1:[161]#3,A$:I[178]ST:[153]A$;
1240 [130]:[160]3
1250 [153]" CONTARE YOU SURE YOU WANT TO QUIT? (YCONT/NCONT)":[151]198,.
1260 A[178][194](203):[139]A[179][177]25[175]A[179][177]39[167]1260
1270 [139]A[178]39[167][153]"ON ":[153]"ONON";:[142]
1280 [153]"CONTPLACE OPEN"DN$" CONTIN THE DRIVE AND"
1290 [153]"PRESS SPACE CONTTO RETURN TO LOADSTAR":[151]198,.
1300 A[178][194](203):[139]A[179][177]60[167]1300
1310 [137]3000
2000 [153]"SYS IS DRIVE 9 YOUR DESTINATION? (Y/N)"
2010 [161]A$:[139]A$[179][177]"Y"[175]A$[179][177]"N"[167]2010
2020 [153]" "
2030 [139]A$[178]"N"[167]DD%[178]8
2040 [142]
3000 [151]45,135:[151]46,27:[151]47,142:[151]48,27:[151]49,142:[151]50,27:[151]51,0
3010 [151]52,128:[151]53,0:[151]54,0:[151]55,0:[151]56,128:[156]
60000 [159]15,8,15,"R0:HELLO CONNECT=HELLO CONNECT":[132]15,ER:[160]15
60010 [139] ER[179][177]63 [167] [153]"LOAD":[128]
60020 A$[178]"HELLO CONNECT":Q$[178][199](34):[151]53281,7:[151]53280,7:[153]"LOAD"
60030 [153]"SYSLOAD"Q$A$Q$",8"
60040 [153]"RUN":[151]631,13:[151]632,13:[151]198,2:[162]